/*********************************************************************\
*                                                                     *
*         Jamper - Java XML mapper (visual XSLT generator)            *
*                Copyright (C) 2005 Filip Pavlovic                    *
*                    sqba@users.sourceforge.net                       *
*                                                                     *
*  This program is free software; you can redistribute it and/or      *
*  modify it under the terms of the GNU General Public License        *
*  as published by the Free Software Foundation; either version 2     *
*  of the License, or (at your option) any later version.             *
*                                                                     *
*  This program is distributed in the hope that it will be useful,    *
*  but WITHOUT ANY WARRANTY; without even the implied warranty of     *
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the      *
*  GNU General Public License for more details.                       *
*                                                                     *
*  You should have received a copy of the GNU General Public License  *
*  along with this program; if not, write to the Free Software        *
*  Foundation, Inc., 59 Temple Place - Suite 330, Boston,             *
*  MA 02111-1307, USA.                                                *
*                                                                     *
\*********************************************************************/


import sqba.jamper.JamperFrame;
import javax.swing.JApplet;
import java.net.URL;
import java.net.MalformedURLException;


public class JamperApplet extends JApplet
{
    public static int _appWidth  = 800;
    public static int _appHeight = 800;

	public void init()
	{
		JamperFrame frame = new JamperFrame();
        
		try {
			JamperFrame._documentBase = getDocumentBase();
			String map = getParameter("map");
			frame._cpid = getParameter("cpid");
			frame._feed = getParameter("feed");
			frame._register = getParameter("register");
			frame._NmsURL = getParameter("NmsURL");
			if("" != map)
			{
		        URL url = new URL(map);
		        frame.loadMap(url.toString());
			}
		} catch (MalformedURLException e) {
			System.out.println(e);
		}

		getContentPane().add(frame.getPane());
	}
}
